package com.woniuxy.controller;


import com.woniuxy.controller.info.ResponseInfo;
import com.woniuxy.service.ResponseService;
import com.woniuxy.utils.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 马世亮
 * @since 2022-02-15
 */
@RestController
@RequestMapping("/response")
public class ResponseController {
    @Resource
    private ResponseService responseService;

    @ApiOperation("获取反馈的信息")
    @GetMapping("/getResponse/{defectid}")
    public Result getResponse(@PathVariable Integer defectid){
        List<ResponseInfo> responseInfos= responseService.getResponse(defectid);

        return Result.success(200,"查询成功",responseInfos);
    }
}

